# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-pyrsistent
pkgver=0.20.0
pkgrel=1
pkgdesc="Persistent/Functional/Immutable data structures"
url="https://github.com/tobgu/pyrsistent"
arch="all"
license="MIT"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	python3-dev
	"
checkdepends="py3-hypothesis py3-pytest py3-pytest-runner"
subpackages="$pkgname-pyc"
source="pyrsistent-$pkgver.tar.gz::https://github.com/tobgu/pyrsistent/archive/v$pkgver.tar.gz"
builddir="$srcdir/pyrsistent-$pkgver"
provides="py-pyrsistent=$pkgver-r$pkgrel"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1cee104adb70f5e2c15a7d95dd3bae22ce73568607869cd8798571ba9c0242e25f80dbcede3df664f75f5271e56fa55248ff12f1c40d450f0788f2e4c749f843  pyrsistent-0.20.0.tar.gz
"
